import { Component } from 'vue-property-decorator';
import { VC } from '@/VC-vue';
import Upload from '@/components/Upload';
import Editor from '@/components/Editor';
import { IMessage } from '@/components/IMessage';
import { createIMessage } from '@/components/IMessage/createIMessage';
import e_log from '@/utils/log';
import { BaseLayout } from '../components/Container/index';
@Component
export default class WorkPlace extends VC {
    fileList: any = [];
    value: any = '';
    Handle(e) {
        console.log(e);
    }
    mounted() {
        e_log('123123');
        // createIMessage({
        //     type: 'info',
        //     content: '哈哈哈哈哈哈哈哈哈哈或或',
        //     title: '操作成功',
        //     time: 'now',
        //     duration: 3000
        // })
    }
    editorValueChange(e) {
        this.value = e;
    }
    protected render() {
        return (
            <BaseLayout breadcrumb>
                {/* <IMessage duration={3000} type="info" /> */}
                <Upload
                    multiple={true}
                    uploadType="file"
                    fileList={this.fileList}
                    {...{ on: { 'update:fileList': this.Handle } }}
                />
                <Editor
                    value={this.value}
                    {...{
                        on: { 'update:value': this.editorValueChange }
                    }}
                />
                <div class="ql-snow">
                    <div class="ql-editor" v-html={this.value} />
                </div>
            </BaseLayout>
        );
    }
}
